Method: ActiveSupport::TimeZone#<=>
- Defined in:
- activesupport/lib/active_support/values/time_zone.rb
permalink #<=>(zone) ⇒ Object
Compare this time zone to the parameter. The two are compared first on their offsets, and then by name.
324 325 326 327 328 329 |
# File 'activesupport/lib/active_support/values/time_zone.rb', line 324 def <=>(zone) return unless zone.respond_to? :utc_offset result = (utc_offset <=> zone.utc_offset) result = (name <=> zone.name) if result == 0 result end |